export default function Lmonitor() {
  return {
    boot: () => {
      if (typeof document !== 'undefined') {
        document.addEventListener('visibilitychange', function () {
          if (this.visibilityState === 'hidden') {
            // console.log('tag close')
          } else {
            // console.log('tag open')
          }
        });

        window.addEventListener('unload', (e: Event) => {
          // console.log('unload', e);
        });
      }
    },
  };
}
